﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using IQKS.AWP.BusinessAccessLayer;
public partial class MasterPages_AdminMaster : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string[] strRoleName;
        strRoleName = Roles.GetRolesForUser(); ;

        switch (strRoleName[0])
        {
            case "IQKSAD":
            case "IQKSMG":
                ahelp.HRef = "~/Download/IQKSMG.pdf";
                break;
            case "GD":
                ahelp.HRef = "~/Download/GD.pdf";
                break;
            case "RD":
                ahelp.HRef = "~/Download/RD.pdf";
                break;
            case "RARL":
                ahelp.HRef = "~/Download/RARL.pdf";
                break;
            case "AD":
                ahelp.HRef = "~/Download/AD.pdf";
                break;
            case "IE":
                ahelp.HRef = "~/Download/IE.pdf";
                break;
            case "CANB":
            case "CANM":
            case "CANR":
                ahelp.HRef = "~/Download/CANB.pdf";
               // ahelp.HRef = "../Download/AD.pdf";
                break;
        }

        ahelp.InnerText = "Help";

        UserMasterBAL objUSRBAL=new UserMasterBAL();
        lblUser.Text = objUSRBAL.GetActualUserName(CommonUtility.GetLoggedOnUserId());
        pLable.InnerText = "Copyright © " +  System.DateTime.Today.Year + " Konsumer Strategiez Pte. Ltd. Singapore, All rights reserved.";

    }
    protected void btnlogoff_Click(object sender, EventArgs e)
    {
        FormsAuthentication.SignOut();
        Roles.DeleteCookie();
        Session.Clear();
        FormsAuthentication.RedirectToLoginPage();
    }
}
